{{ header }}
<div id="account-wishlist" class="container wishlist-container">
	{#{{ include(helper.template('_partial/breadcrumb')) }}#}
	{% if success %}
        <div class="alert alert-success alert-dismissible"><i class="fa fa-check-circle"></i> {{ success }}
            <button type="button" class="close" data-dismiss="alert">&times;</button>
        </div>
	{% endif %}
    <div class="wish-lists">
		{#{{ column_left }}#}
		{#{% if column_left and column_right %}#}
			{#{% set class = 'col-sm-6' %}#}
		{#{% elseif column_left or column_right %}#}
			{#{% set class = 'col-sm-9' %}#}
		{#{% else %}#}
			{#{% set class = 'col-sm-12' %}#}
		{#{% endif %}#}
		<div class="content">
			<h2>{{ heading_title }}</h2>
			{% if products %}
				<div class="product-lists">
					{% for product in products %}
						<div class="wish-product">
							<div class="product-image text-center" title="{{ product.name }}">
								<a href="{{ product.href }}">
									<img src="{{ product.thumb }}" alt="">
								</a>
							</div>
							<div class="product-title" title="{{ product.name }}">
								<a href="{{ product.href }}">{{ product.name }}</a>
							</div>
							<div class="price-block">
								{% if not product.special %}
									<span class="new-price">{{ product.price }}</span>
								{% else %}
								<span class="new-price">{{ product.special }}</span>
								<span class="old-price">{{ product.price }}</span>
								{% endif %}
							</div>
							<div class="operation-block text-right">
								<a href="{{ product.remove }}"><i class="fa fa-trash"></i></a>
							</div>
						</div>
					{% endfor %}
				</div>
				<div class="text-center">{{ pagination }}</div>
			{% else %}
				<div class="no-items">
					<img src="catalog/view/theme/default/image/icon/icon_no_wish.svg" class="img-responsive">
					<span>{{ text_no_results }}</span>
				</div>
			{% endif %}
		</div>
        {#<div id="content" class="{{ class }}">{{ content_top }}#}
            {#<h2>{{ heading_title }}</h2>#}
			{#{% if products %}#}
                {#<div class="table-responsive">#}
                    {#<table class="table table-bordered table-hover">#}
                        {#<thead>#}
                        {#<tr>#}
                            {#<td class="text-center">{{ column_image }}</td>#}
                            {#<td class="text-left">{{ column_name }}</td>#}
                            {#<td class="text-left">{{ column_model }}</td>#}
                            {#<td class="text-right">{{ column_stock }}</td>#}
                            {#<td class="text-right">{{ column_price }}</td>#}
                            {#<td class="text-right">{{ column_action }}</td>#}
                        {#</tr>#}
                        {#</thead>#}
                        {#<tbody>#}
						{#{% for product in products %}#}
                            {#<tr>#}
                                {#<td class="text-center">{% if product.thumb %}<a href="{{ product.href }}"><img src="{{ product.thumb }}" alt="{{ product.name }}" title="{{ product.name }}" /></a>{% endif %}</td>#}
                                {#<td class="text-left"><a href="{{ product.href }}">{{ product.name }}</a></td>#}
                                {#<td class="text-left">{{ product.model }}</td>#}
                                {#<td class="text-right">{{ product.stock }}</td>#}
                                {#<td class="text-right">{% if product.price %}#}
                                        {#<div class="price"> {% if not product.special %}#}
												{#{{ product.price }}#}
											{#{% else %} <b>{{ product.special }}</b> <s>{{ product.price }}</s> {% endif %} </div>#}
									{#{% endif %}</td>#}
                                {#<td class="text-right"><button type="button" onclick="cart.add('{{ product.product_id }}');" data-toggle="tooltip" title="{{ button_cart }}" class="btn btn-primary"><i class="fa fa-shopping-cart"></i></button>#}
                                    {#<a href="{{ product.remove }}" data-toggle="tooltip" title="{{ button_remove }}" class="btn btn-danger"><i class="fa fa-times"></i></a></td>#}
                            {#</tr>#}
						{#{% endfor %}#}
                        {#</tbody>#}
                    {#</table>#}
                {#</div>#}
			{#{% else %}#}
                {#<div class="no-items">#}
                    {#<img src="catalog/view/theme/{{ helper.config('theme_default_directory') }}/image/no_items.png" class="img-responsive">#}
                    {#<span>{{ text_no_results }}</span>#}
                {#</div>#}
			{#{% endif %}#}
			{#{{ content_bottom }}#}
        {#</div>#}
		{#{{ column_right }}#}
    </div>
</div>
{{ footer }}
<script type="text/javascript">
    jQuery( document ).ready(function($){
        // 监听点击事件，调用弹框layer
        $('.operation-block > a').click(function(e){
            e.preventDefault();

            var remove_url = this.href;
			var content = '{{ confirm_delete }}';
            var btn_text = '{{ confirm_btn }}';

            var wish_delete_index = layer.open({
                skin: 'layer-alert',
                title: ' ',
                btnAlign: 'c',
                shadeClose: true,
                shade: [0.6,'#000'],
                content: content,
                btn: [btn_text],
                yes: function() {
                    window.location.href = remove_url;
                }
            });
            // 设置中间内容居中
            layer.style(wish_delete_index,{
				textAlign: 'center'
			});
		})
	});
</script>
